This sample demonstrates how to use ink functionality (such as, capturing, manipulating, and interpreting ink strokes) in Windows Store apps using JavaScript, C#, and C++. This is a lightweight version of Input: Ink sample that exposes app commands through keyboard shortcuts instead of the app UI.
Specifically, this sample covers using the Windows.UI.Input.Inking APIs to do the following:
- Render ink strokes
- Save and load ink strokes
- Copy and paste ink strokes
- Select ink strokes
- Delete ink strokes
- Recognize handwriting from ink strokes
Note Read the following instructions before using the app.
- Draw ink strokes with a pen or with a mouse while pressing the left mouse button.
- Erase ink strokes with a pen eraser tip, a pen while pressing the barrel button, or a mouse while pressing the right mouse button.
- Select ink strokes by drawing a lasso around the strokes with a pen while pressing the barrel button, or a mouse while pressing both the left mouse button and the CTRL key on the keyboard.
- You can also use the following keyboard shortcuts to manage, manipulate, and process ink strokes:
- CTRL+A to select all strokes.
- CTRL+C to copy selected strokes onto the clipboard.
- CTRL+D to change drawing attributes.
- CTRL+O to read Graphics Interchange Format (GIF) with embedded Ink Serialized Format (ISF) files from the Libraries or Pictures folder (or both).
- CTRL+R to change the ink recognizer.
- CTRL+S to write GIF with embedded ISF files to the Libraries or Pictures folder (or both).
- CTRL+T to copy text from ink recognition onto the clipboard.
- CTRL+V to paste strokes from the clipboard.
- Space to perform ink recognition.
- Backspace to delete strokes.
To obtain an evaluation copy of Windows 8.1, go to Windows 8.1.
To obtain an evaluation copy of Microsoft Visual Studio 2013, go to Visual Studio 2013.
Note For Windows 8 app samples, download the Windows 8 app samples pack. The samples in the Windows 8 app samples pack will build and run only on Microsoft Visual Studio 2012.
Related topics
- Getting started with apps
- Responding to pen and stylus interactions
- Responding to user interaction
- Windows 8 app samples
- Samples
- Input: Ink sample
- Reference
- Windows.UI.Input.Inking
Operating system requirements
| Client | |
|---|---|
| Server |
Build the sample
To build this sample:
- Start Visual Studio and select File > Open > Project/Solution.
- Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Microsoft Visual Studio Solution (.sln) file.
- Press F7 or use Build > Build Solution to build the sample.
Run the sample
To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.